from encrypter import MyMD5

x = MyMD5().encrypt("1111111111111111111111111111111111111111111111111111111111111111111111111111")
print(type(x),x,len(x))

import json
import common
import requests
from main import main

def send(
    route,
    json_content=None,
    post=True,
    ip = common.args.ClientUIBackendIP,
    port = common.args.ClientUIBackendPort
):
    url = f"http://{ip}:{port}"
    url = f"{url}{route}"
    if post:
        resp = requests.post(url,json=json_content)
    else:
        resp = requests.get(url)
    resp_content = resp.content.decode("utf-8")
    return resp_content

# OK
r = send("/sign_in",{
    "account_private_key":"1eb8e2955a7c928c1d5b4568c0ea42a3d3f31968f49efc40a1351e3b255f00fe"
})
print(r)


r = send("/all_registrations",post=False)
print(r)


r = send("/all_DOs",post=False)
print(r)

